#ifndef PRODUCTTYPES_H
#define PRODUCTTYPES_H

#include <QtSql>
#include <QMainWindow>

namespace Ui {
    class ProductTypes;
}

class ProductTypes : public QMainWindow
{
    Q_OBJECT

public:
    explicit ProductTypes(QWidget *parent = 0);
    ~ProductTypes();
    void loadList();
    QSqlDatabase db;
    void setDb(QSqlDatabase newDb);
    QSqlQueryModel *model;
protected:
    void changeEvent(QEvent *e);

private:
    Ui::ProductTypes *ui;

private slots:
    void on_treeView_doubleClicked(QModelIndex index);
    void on_pushButtonClose_clicked();
    void on_pushButtonEdit_clicked();
    void on_pushButtonView_clicked();
    void on_pushButtonNew_clicked();
};

#endif // PRODUCTTYPES_H
